home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / README.mf < prev    next >
Text File  |  1993-09-15  |  4KB  |  114 lines

  1. MetaFont Terminal Driver for GnuPlot (MF.TRM):
  2. ----------------------------------------------
  3. The new terminal driver creates a input file to the MetaFont program.
  4. Thus a figure may be used in the TeX document in the same way as a
  5. character is.
  6.  
  7. To use the plot in a document the MetaFont program must be run
  8. with the output file from GnuPlot as input. Thus, the user needs a basic
  9. knowledge of the font creating prosess and inclusion of a new font in a
  10. document. However, if the Metafont program are set up properly at the
  11. local site an unexperienced user could perform the operation without
  12. much trouble.
  13.  
  14. The text support is based on a MetaFont character set.
  15. Currently the Computer Modern Roman font set is input but the
  16. user are in principal free to chose whatever fonts he/she needs.
  17. The MetaFont source files for the chosen font must be available.
  18. Each character is stored in a separate picture variable in MetaFont. These
  19. variables may be manipulated (rotated, scaled etc.) when characters are
  20. needed. The drawback is the interpretation time in the MetaFont
  21. program. On some machines (i.e. PC) the limited amount of memory available
  22. may also cause problem if too many pictures are stored.
  23.  
  24. The MetaFont terminal driver MF.TRM is UENCODED and included in this mail.
  25. Also the "diff" files between an orginal TERM.C and mine are
  26. UENCODED included. I am afraid there may be several
  27. differences which are not due to the MetaFont terminal. However, the new
  28. terminal driver should be included in exactly the same manner as the other.
  29.  
  30. In TERM.H the only necessary change is :
  31.  
  32.                #define MF
  33.  
  34. Please inform me if something  goes wrong. I will then transfer the code
  35. to an anonymous FTP cite where you can pick it up.
  36.  
  37. To use the MetaFont terminal driver:
  38. ------------------------------------
  39. 1) In GnuPlot use:   set terminal mf
  40.                      set output "myfile.mf"
  41.                           .
  42.                           .
  43.                           .
  44.                      plot ....
  45.                      exit
  46.  
  47.  
  48. 2) Run MetaFont. Syntax is site dependant:
  49.  
  50.    On my UNIX I use:   cmmf '\mode=localfont; \mag=1;' input myfile.mf
  51.    On my PC I use:     mf286 &cm \mode=localfont; \mag=1; input myfile.mf
  52.  
  53.    Be aware that MetaFont can only handle number less than 4096. Thus if you
  54.  
  55.    have very high resolution in your localfont and a large picture you will
  56.    probably get an error message when running metaFont. To solve the
  57. problem,
  58.    reduce the resolution or the plot size.
  59.  
  60. 3) Run GfToPk, syntax is
  61.  
  62.    on my UNIX:   gftpk myfile.xxxgf myfile.pk
  63.    on my PC:     gftpk myfile.xxx myfile.pk
  64.  
  65.    where xxx is the resolution (typically 300).
  66.  
  67.    The version of GfToPk included with unix TeX3.14 probably needs to be
  68.    compiled with more memory than it is. Third line in GFTOPK.C declares
  69.    a variable "maxrow". Defining this to 32000 should be sufficient.
  70.  
  71. 4) Copy the files myfile.pk and myfile.tfm to a place where you are sure TeX
  72.    and the dvi processing programs you use  can find them. (They can
  73. probably
  74.    be located in your current working directory)
  75.  
  76. 5) Include in your TeX document the following statement:
  77.  
  78.       \font\myfont=myfile  % Declares the new font you just have made
  79.       {\myfont\char0}      % Typeset character with code zero which
  80.                            % MF.TRM uses as default character
  81.  
  82.  
  83.  
  84.  
  85.  
  86. HPGL to GnuPlot converter (HPG2GNU):
  87. -------------------------------------
  88. I have also written a program which interprets files written in
  89. Hewlett Packard's plotter language, HPGL, and outputs the graphic
  90. on an available GnuPlot terminal.
  91.  
  92. Personally, I have used the program as an link to the MetaFont terminal
  93. (the orginal version of the program only translated from HPGL to MF).
  94. This way I am able to design pictures in my favorite graphic drawing
  95. program,
  96. export the figures to HPGL files and translate to MetaFont. A lot of new
  97. symbols (fancy arrows, electronic components, process symbols etc. etc.)
  98. can thus be  made available to TeX as new font sets without the need to dig
  99. into the MetaFont manual.
  100.  
  101. However, the program is now mainly based on code from the GnuPlot
  102. program and according to the copyright notes should not be distributed.
  103.  
  104.  
  105. With regard
  106.  
  107. Paal Hedne
  108. SINTEF Multiphase Laboratory
  109. N-7034 Trondheim
  110. Norway
  111.  
  112. Tel.: -47-7-591060
  113. E.mail: Pal.Hedne@termo.unit.no
  114.